package com.swanclouds.redfish.managers.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.ModelEntity;

/**
 * @author 李文强
 * description
 */
public class UpdateNetworkProtocol implements ModelEntity {

    @JsonProperty("HTTPS")
    private Parameter https;

    @JsonProperty("HTTP")
    private Parameter http;

    @JsonProperty("SSH")
    private Parameter ssh;

    @JsonProperty("KVMIP")
    private Parameter kvmip;

    @JsonProperty("VirtualMedia")
    private Parameter virtualMedia;

    @JsonProperty("SNMP")
    private Parameter snmp;

    @JsonProperty("Telnet")
    private Parameter telnet;

    @JsonProperty("SSDP")
    private Parameter ssdp;

    @JsonProperty("IPMI")
    private Parameter ipmi;

    public UpdateNetworkProtocol https(Parameter https){
        this.https = https;
        return this;
    }

    public UpdateNetworkProtocol http(Parameter http){
        this.http = http;
        return this;
    }

    public UpdateNetworkProtocol ssh(Parameter ssh){
        this.ssh = ssh;
        return this;
    }

    public UpdateNetworkProtocol kvmip(Parameter kvmip){
        this.kvmip = kvmip;
        return this;
    }

    public UpdateNetworkProtocol virtualMedia(Parameter virtualMedia){
        this.virtualMedia = virtualMedia;
        return this;
    }

    public UpdateNetworkProtocol snmp(Parameter snmp){
        this.snmp = snmp;
        return this;
    }

    public UpdateNetworkProtocol telnet(Parameter telnet){
        this.telnet = telnet;
        return this;
    }

    public UpdateNetworkProtocol ssdp(Parameter ssdp){
        this.ssdp = ssdp;
        return this;
    }

    public UpdateNetworkProtocol ipmi(Parameter ipmi){
        this.ipmi = ipmi;
        return this;
    }

    public static UpdateNetworkProtocol xxx(){
      return new UpdateNetworkProtocol();
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (
                JsonProcessingException e) {
        }
        return "UpdateNetworkProtocol{" +
                "https=" + https +
                ", http=" + http +
                ", ssh=" + ssh +
                ", kvmip=" + kvmip +
                ", virtualMedia=" + virtualMedia +
                ", snmp=" + snmp +
                ", telnet=" + telnet +
                ", ssdp=" + ssdp +
                ", ipmi=" + ipmi +
                '}';
    }
}
